package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.domin.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;

@Mapper
public interface UserMapper extends BaseMapper<User> {


    @Select("SELECT COUNT(*) FROM user WHERE Date(created_at) =#{date}")
    int dailyUsers(Date date);
    @Update("update user set deleted = '1' where user_id = #{id}")
    Boolean ban(String id);

}
